﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace SCADA_SANEST.ViewModels.Components
{
    public class Air_ValveViewModel : BaseViewModel
    {
        private bool _isOpen;
        public bool IsOpen
        {
            get => _isOpen;
            set
            {
                if (SetProperty(ref _isOpen, value))
                {
                    // Cập nhật màu khi trạng thái thay đổi
                    ValveColor = _isOpen ? Brushes.Green : Brushes.Red;
                }
            }
        }

        private Brush _valveColor = Brushes.Red;
        public Brush ValveColor
        {
            get => _valveColor;
            private set => SetProperty(ref _valveColor, value);
        }
    }
}
